Integrand size = 19, antiderivative size = 73 \[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=a x+\frac {3 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {(8 a+3 b \sec (c+d x)) \tan (c+d x)}{8 d}+\frac {(4 a+3 b \sec (c+d x)) \tan ^3(c+d x)}{12 d} \]
a*x+3/8*b*arctanh(sin(d*x+c))/d-1/8*(8*a+3*b*sec(d*x+c))*tan(d*x+c)/d+1/12 *(4*a+3*b*sec(d*x+c))*tan(d*x+c)^3/d
Time = 0.02 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.60 \[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=\frac {a \arctan (\tan (c+d x))}{d}+\frac {3 b \text {arctanh}(\sin (c+d x))}{8 d}-\frac {a \tan (c+d x)}{d}+\frac {3 b \sec (c+d x) \tan (c+d x)}{8 d}-\frac {3 b \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a \tan ^3(c+d x)}{3 d}+\frac {b \sec (c+d x) \tan ^3(c+d x)}{d} \]
(a*ArcTan[Tan[c + d*x]])/d + (3*b*ArcTanh[Sin[c + d*x]])/(8*d) - (a*Tan[c + d*x])/d + (3*b*Sec[c + d*x]*Tan[c + d*x])/(8*d) - (3*b*Sec[c + d*x]^3*Ta n[c + d*x])/(4*d) + (a*Tan[c + d*x]^3)/(3*d) + (b*Sec[c + d*x]*Tan[c + d*x ]^3)/d
Time = 0.35 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.12, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3042, 4369, 3042, 4369, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^4(c+d x) (a+b \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4369 |
\(\displaystyle \frac {\tan ^3(c+d x) (4 a+3 b \sec (c+d x))}{12 d}-\frac {1}{4} \int (4 a+3 b \sec (c+d x)) \tan ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\tan ^3(c+d x) (4 a+3 b \sec (c+d x))}{12 d}-\frac {1}{4} \int \cot \left (c+d x+\frac {\pi }{2}\right )^2 \left (4 a+3 b \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4369 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{2} \int (8 a+3 b \sec (c+d x))dx-\frac {\tan (c+d x) (8 a+3 b \sec (c+d x))}{2 d}\right )+\frac {\tan ^3(c+d x) (4 a+3 b \sec (c+d x))}{12 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{2} \left (8 a x+\frac {3 b \text {arctanh}(\sin (c+d x))}{d}\right )-\frac {\tan (c+d x) (8 a+3 b \sec (c+d x))}{2 d}\right )+\frac {\tan ^3(c+d x) (4 a+3 b \sec (c+d x))}{12 d}\) |
((4*a + 3*b*Sec[c + d*x])*Tan[c + d*x]^3)/(12*d) + ((8*a*x + (3*b*ArcTanh[ Sin[c + d*x]])/d)/2 - ((8*a + 3*b*Sec[c + d*x])*Tan[c + d*x])/(2*d))/4
3.3.65.3.1 Defintions of rubi rules used
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-e)*(e*Cot[c + d*x])^(m - 1)*((a*m + b*(m - 1)*Csc [c + d*x])/(d*m*(m - 1))), x] - Simp[e^2/m Int[(e*Cot[c + d*x])^(m - 2)*( a*m + b*(m - 1)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[m , 1]
Time = 1.50 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.42
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )+b \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(104\) |
default | \(\frac {a \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+d x +c \right )+b \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(104\) |
parts | \(\frac {a \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {b \left (\frac {\sin \left (d x +c \right )^{5}}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin \left (d x +c \right )^{5}}{8 \cos \left (d x +c \right )^{2}}-\frac {\sin \left (d x +c \right )^{3}}{8}-\frac {3 \sin \left (d x +c \right )}{8}+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(109\) |
risch | \(a x +\frac {i \left (15 b \,{\mathrm e}^{7 i \left (d x +c \right )}-48 a \,{\mathrm e}^{6 i \left (d x +c \right )}-9 b \,{\mathrm e}^{5 i \left (d x +c \right )}-96 a \,{\mathrm e}^{4 i \left (d x +c \right )}+9 b \,{\mathrm e}^{3 i \left (d x +c \right )}-80 a \,{\mathrm e}^{2 i \left (d x +c \right )}-15 b \,{\mathrm e}^{i \left (d x +c \right )}-32 a \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}\) | \(150\) |
1/d*(a*(1/3*tan(d*x+c)^3-tan(d*x+c)+d*x+c)+b*(1/4*sin(d*x+c)^5/cos(d*x+c)^ 4-1/8*sin(d*x+c)^5/cos(d*x+c)^2-1/8*sin(d*x+c)^3-3/8*sin(d*x+c)+3/8*ln(sec (d*x+c)+tan(d*x+c))))
Time = 0.28 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.53 \[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=\frac {48 \, a d x \cos \left (d x + c\right )^{4} + 9 \, b \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, b \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (32 \, a \cos \left (d x + c\right )^{3} + 15 \, b \cos \left (d x + c\right )^{2} - 8 \, a \cos \left (d x + c\right ) - 6 \, b\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
1/48*(48*a*d*x*cos(d*x + c)^4 + 9*b*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 9*b*cos(d*x + c)^4*log(-sin(d*x + c) + 1) - 2*(32*a*cos(d*x + c)^3 + 15*b *cos(d*x + c)^2 - 8*a*cos(d*x + c) - 6*b)*sin(d*x + c))/(d*cos(d*x + c)^4)
\[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right ) \tan ^{4}{\left (c + d x \right )}\, dx \]
Time = 0.29 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.40 \[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=\frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a + 3 \, b {\left (\frac {2 \, {\left (5 \, \sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{48 \, d} \]
1/48*(16*(tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))*a + 3*b*(2*(5*sin (d*x + c)^3 - 3*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) + 3* log(sin(d*x + c) + 1) - 3*log(sin(d*x + c) - 1)))/d
Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (67) = 134\).
Time = 0.93 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.36 \[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=\frac {24 \, {\left (d x + c\right )} a + 9 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 9 \, b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 104 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 33 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 104 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 33 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 9 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
1/24*(24*(d*x + c)*a + 9*b*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 9*b*log(ab s(tan(1/2*d*x + 1/2*c) - 1)) + 2*(24*a*tan(1/2*d*x + 1/2*c)^7 - 9*b*tan(1/ 2*d*x + 1/2*c)^7 - 104*a*tan(1/2*d*x + 1/2*c)^5 + 33*b*tan(1/2*d*x + 1/2*c )^5 + 104*a*tan(1/2*d*x + 1/2*c)^3 + 33*b*tan(1/2*d*x + 1/2*c)^3 - 24*a*ta n(1/2*d*x + 1/2*c) - 9*b*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1 )^4)/d
Time = 15.24 (sec) , antiderivative size = 267, normalized size of antiderivative = 3.66 \[ \int (a+b \sec (c+d x)) \tan ^4(c+d x) \, dx=\frac {2\,a\,\mathrm {atan}\left (\frac {64\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^3+9\,a\,b^2}+\frac {9\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^3+9\,a\,b^2}\right )}{d}+\frac {3\,b\,\mathrm {atanh}\left (\frac {27\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,\left (24\,a^2\,b+\frac {27\,b^3}{8}\right )}+\frac {24\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{24\,a^2\,b+\frac {27\,b^3}{8}}\right )}{4\,d}-\frac {\left (\frac {3\,b}{4}-2\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {26\,a}{3}-\frac {11\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {26\,a}{3}-\frac {11\,b}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,a+\frac {3\,b}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
(2*a*atan((64*a^3*tan(c/2 + (d*x)/2))/(9*a*b^2 + 64*a^3) + (9*a*b^2*tan(c/ 2 + (d*x)/2))/(9*a*b^2 + 64*a^3)))/d + (3*b*atanh((27*b^3*tan(c/2 + (d*x)/ 2))/(8*(24*a^2*b + (27*b^3)/8)) + (24*a^2*b*tan(c/2 + (d*x)/2))/(24*a^2*b + (27*b^3)/8)))/(4*d) - (tan(c/2 + (d*x)/2)*(2*a + (3*b)/4) - tan(c/2 + (d *x)/2)^7*(2*a - (3*b)/4) - tan(c/2 + (d*x)/2)^3*((26*a)/3 + (11*b)/4) + ta n(c/2 + (d*x)/2)^5*((26*a)/3 - (11*b)/4))/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*t an(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1))